function tableSelect(allCheckedDomId, checkedDomClassName) {
  var allChecked = document.getElementById(allCheckedDomId);
  var checkedList = document.getElementsByClassName(checkedDomClassName);
  // 设置表格全选、非全选
  allChecked.onclick = function() {
    for (var i = 0; i < checkedList.length; i++) {
      checkedList[i].checked = allChecked.checked;
    }
  };
  // 设置表格单选
  for (var i = 0; i < checkedList.length; i++) {
    checkedList[i].onclick = function() {
      var flag = true;
      for (var n = 0; n < checkedList.length; n++) {
        if (!checkedList[n].checked) {
          flag = false;
          break;
        }
      }
      allChecked.checked = flag;
    };
  }
}
